﻿namespace QLPhongKham.UC
{
    using DevExpress.Data;
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Mask;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.Base;
    using DevExpress.XtraGrid.Views.Grid;
    using DevExpress.XtraTab;
    using QLPhongKham.Access;
    using QLPhongKham.Access.Duoc;
    using QLPhongKham.BaseClass.Duoc;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms;

    public class ucd_xuatkho_banle_kkedon_ds : XtraUserControl
    {
        private dtoDXuatBanLe _dtocur;
        private int _iiddangnhap;
        private DXuatBanLe _xuatban;
        private General _xuli;
        private Bar bar1;
        private Bar bar2;
        private Bar bar3;
        private BarDockControl barDockControl1;
        private BarDockControl barDockControl2;
        private BarDockControl barDockControl3;
        private BarDockControl barDockControl4;
        private BarDockControl barDockControlBottom;
        private BarDockControl barDockControlLeft;
        private BarDockControl barDockControlRight;
        private BarDockControl barDockControlTop;
        private BarManager barManager1;
        private BarButtonItem bbihuy;
        private BarButtonItem bbiketthuc;
        private BarButtonItem bbimoi;
        private BarButtonItem bbisua;
        private SimpleButton btntim;
        private IContainer components;
        private DateEdit datedenngay;
        private DateEdit datetungay;
        private GridControl gridds;
        private GridColumn gridds_dongia;
        private GridColumn gridds_dvt;
        private GridColumn gridds_giaban;
        private GridColumn gridds_handung;
        private GridColumn gridds_hangsx;
        private GridColumn gridds_id;
        private GridColumn gridds_idnhapct;
        private GridColumn gridds_idvitrikho;
        private GridColumn gridds_losx;
        private GridColumn gridds_ma;
        private GridColumn gridds_slxuat;
        private GridColumn gridds_soluong;
        private GridColumn gridds_ten;
        private GridColumn gridds_tenhoatchat;
        private GridColumn gridds_tenvitrikho;
        private GridColumn gridds_thanhtien;
        private GridColumn gridds_thue;
        private GridColumn gridds_tongtien;
        private GridControl gridsp;
        private GridColumn gridsp_chietkhau;
        private GridColumn gridsp_diachi;
        private GridColumn gridsp_hoten;
        private GridColumn gridsp_id;
        private GridColumn gridsp_namsinh;
        private GridColumn gridsp_ngay;
        private GridColumn gridsp_phai;
        private GridColumn gridsp_sophieu;
        private GridColumn gridsp_tongtien;
        private GridView gridView1;
        private GridView gridView2;
        private GroupControl groupControl1;
        private GroupControl groupControl2;
        private Label label11;
        private Label label25;
        private Label label27;
        private RepositoryItemTextEdit repositoryItemTextEdit1;
        private RepositoryItemTextEdit repositoryItemTextEdit2;
        private RepositoryItemTextEdit repositoryItemTextEdit3;
        private RepositoryItemTextEdit repositoryItemTextEdit4;
        private StandaloneBarDockControl standaloneBarDockControl1;
        private ucd_xuatkho_banle_kkedon_ll ucxuatkho;

        public ucd_xuatkho_banle_kkedon_ds()
        {
            this._iiddangnhap = 0;
            this.components = null;
            this.InitializeComponent();
            this._xuli = new General();
        }

        public ucd_xuatkho_banle_kkedon_ds(int iddangnhap)
        {
            this._iiddangnhap = 0;
            this.components = null;
            this.InitializeComponent();
            this._xuli = new General();
            this._iiddangnhap = iddangnhap;
        }

        public ucd_xuatkho_banle_kkedon_ds(General xuli, int iddangnhap)
        {
            this._iiddangnhap = 0;
            this.components = null;
            this.InitializeComponent();
            this._xuli = xuli;
            this._iiddangnhap = iddangnhap;
        }

        private void bbihuy_ItemClick(object sender, ItemClickEventArgs e)
        {
            if ((this.bbihuy.Visibility != BarItemVisibility.Never) && (this._dtocur != null))
            {
                DXuatBanLe le = new DXuatBanLe(this._xuli.pConFigData);
                if (MessageBox.Show("Số phiếu " + this._dtocur.pSOPHIEU + " sẽ hủy trong dữ liệu.\nBạn c\x00f3 chắc chắn muốn hủy số phiếu n\x00e0y?", "Th\x00f4ng b\x00e1o", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) != DialogResult.No)
                {
                    if (!le.f_huy_xuatbanle(this._dtocur))
                    {
                        MessageBox.Show("Hủy kh\x00f4ng th\x00e0nh c\x00f4ng.\nVui l\x00f2ng kiểm tra lại.", "Th\x00f4ng b\x00e1o");
                    }
                    else
                    {
                        this.btntim_Click(null, null);
                    }
                }
            }
        }

        private void bbiketthuc_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.btnketthuc_Click(null, null);
        }

        private void bbimoi_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.ucxuatkho = new ucd_xuatkho_banle_kkedon_ll(this._xuli, this._iiddangnhap);
            this.ucxuatkho.Show();
            base.Controls.Add(this.ucxuatkho);
            this.ucxuatkho.Location = new Point(0, this.groupControl1.Location.Y);
            this.ucxuatkho.Width = base.Width;
            this.ucxuatkho.Height = base.Height - this.ucxuatkho.Location.Y;
            this.ucxuatkho.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.ucxuatkho.BringToFront();
        }

        private void bbisua_ItemClick(object sender, ItemClickEventArgs e)
        {
            if ((this.bbisua.Visibility != BarItemVisibility.Never) && (this._dtocur != null))
            {
                this.ucxuatkho = new ucd_xuatkho_banle_kkedon_ll(this._xuli, this._dtocur, this._iiddangnhap);
                this.ucxuatkho.Show();
                base.Controls.Add(this.ucxuatkho);
                this.ucxuatkho.Location = new Point(0, this.groupControl1.Location.Y);
                this.ucxuatkho.Width = base.Width;
                this.ucxuatkho.Height = base.Height - this.ucxuatkho.Location.Y;
                this.ucxuatkho.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
                this.ucxuatkho.BringToFront();
            }
        }

        private void btnketthuc_Click(object sender, EventArgs e)
        {
            try
            {
                XtraTabPage parent = (XtraTabPage) base.Parent;
                XtraTabControl control = (XtraTabControl) parent.Parent;
                control.TabPages.Remove(parent);
            }
            catch
            {
                XtraUserControl control2 = (XtraUserControl) base.Parent;
                control2.Controls.Remove(this);
            }
        }

        private void btntim_Click(object sender, EventArgs e)
        {
            this._xuatban.pLoaiXuat = HangSo.LoaiXuatKho.enLoaiXuatKho.XuatBanKhongKeDon.GetHashCode();
            this.gridsp.DataSource = this._xuatban.f_loaddata_xuatban(0L, this.datetungay.Text, this.datedenngay.Text);
            this.f_loadinfo_phieuxuat(0);
        }

        private void btnxoa_Click(object sender, EventArgs e)
        {
            try
            {
                this.gridView1.DeleteSelectedRows();
            }
            catch
            {
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void f_loaddata_xuatbanlect(long idxuatban)
        {
            DataTable table = this._xuatban.f_loaddata_xuatbanct(idxuatban);
            this.gridds.DataSource = table;
        }

        private void f_loadinfo_phieuxuat(int numrow)
        {
            try
            {
                long num = long.Parse(this.gridView2.GetRowCellValue(numrow, this.gridsp_id).ToString());
                this._dtocur = new dtoDXuatBanLe();
                this._dtocur.pID = num;
                this._dtocur.Load();
                this.f_loaddata_xuatbanlect(this._dtocur.pID);
            }
            catch
            {
                this.gridds.DataSource = null;
            }
        }

        private void gridView1_CustomSummaryCalculate(object sender, CustomSummaryEventArgs e)
        {
        }

        private void gridView1_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            int num = 0;
            try
            {
                if (this.gridView1.IsFocusedView)
                {
                    num = this.gridView1.GetSelectedRows()[0];
                }
            }
            catch
            {
            }
        }

        private void gridView1_RowCellStyle(object sender, RowCellStyleEventArgs e)
        {
        }

        private void gridView2_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            int numrow = 0;
            try
            {
                if (this.gridView2.IsFocusedView)
                {
                    numrow = this.gridView2.GetSelectedRows()[0];
                    this.f_loadinfo_phieuxuat(numrow);
                }
            }
            catch
            {
            }
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            StyleFormatCondition condition = new StyleFormatCondition();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(ucd_xuatkho_banle_kkedon_ds));
            StyleFormatCondition condition2 = new StyleFormatCondition();
            this.gridds_dongia = new GridColumn();
            this.repositoryItemTextEdit2 = new RepositoryItemTextEdit();
            this.gridView1 = new GridView();
            this.gridds_ma = new GridColumn();
            this.repositoryItemTextEdit1 = new RepositoryItemTextEdit();
            this.gridds_ten = new GridColumn();
            this.gridds_dvt = new GridColumn();
            this.gridds_id = new GridColumn();
            this.gridds_soluong = new GridColumn();
            this.gridds_thanhtien = new GridColumn();
            this.gridds_idnhapct = new GridColumn();
            this.gridds_slxuat = new GridColumn();
            this.gridds_tenhoatchat = new GridColumn();
            this.gridds_giaban = new GridColumn();
            this.gridds_losx = new GridColumn();
            this.gridds_handung = new GridColumn();
            this.gridds_hangsx = new GridColumn();
            this.gridds_idvitrikho = new GridColumn();
            this.gridds_thue = new GridColumn();
            this.gridds_tongtien = new GridColumn();
            this.gridds_tenvitrikho = new GridColumn();
            this.gridds = new GridControl();
            this.groupControl1 = new GroupControl();
            this.btntim = new SimpleButton();
            this.datetungay = new DateEdit();
            this.datedenngay = new DateEdit();
            this.label27 = new Label();
            this.label11 = new Label();
            this.gridsp = new GridControl();
            this.gridView2 = new GridView();
            this.gridsp_id = new GridColumn();
            this.gridsp_sophieu = new GridColumn();
            this.gridsp_ngay = new GridColumn();
            this.gridsp_hoten = new GridColumn();
            this.gridsp_diachi = new GridColumn();
            this.gridsp_namsinh = new GridColumn();
            this.gridsp_phai = new GridColumn();
            this.gridsp_chietkhau = new GridColumn();
            this.gridsp_tongtien = new GridColumn();
            this.repositoryItemTextEdit3 = new RepositoryItemTextEdit();
            this.repositoryItemTextEdit4 = new RepositoryItemTextEdit();
            this.standaloneBarDockControl1 = new StandaloneBarDockControl();
            this.groupControl2 = new GroupControl();
            this.bar1 = new Bar();
            this.barDockControlTop = new BarDockControl();
            this.barDockControlBottom = new BarDockControl();
            this.barDockControlLeft = new BarDockControl();
            this.barDockControlRight = new BarDockControl();
            this.bar2 = new Bar();
            this.barManager1 = new BarManager(this.components);
            this.bar3 = new Bar();
            this.bbimoi = new BarButtonItem();
            this.bbisua = new BarButtonItem();
            this.bbihuy = new BarButtonItem();
            this.bbiketthuc = new BarButtonItem();
            this.barDockControl1 = new BarDockControl();
            this.barDockControl2 = new BarDockControl();
            this.barDockControl3 = new BarDockControl();
            this.barDockControl4 = new BarDockControl();
            this.label25 = new Label();
            this.repositoryItemTextEdit2.BeginInit();
            this.gridView1.BeginInit();
            this.repositoryItemTextEdit1.BeginInit();
            this.gridds.BeginInit();
            this.groupControl1.BeginInit();
            this.groupControl1.SuspendLayout();
            this.datetungay.Properties.VistaTimeProperties.BeginInit();
            this.datetungay.Properties.BeginInit();
            this.datedenngay.Properties.VistaTimeProperties.BeginInit();
            this.datedenngay.Properties.BeginInit();
            this.gridsp.BeginInit();
            this.gridView2.BeginInit();
            this.repositoryItemTextEdit3.BeginInit();
            this.repositoryItemTextEdit4.BeginInit();
            this.groupControl2.BeginInit();
            this.groupControl2.SuspendLayout();
            this.barManager1.BeginInit();
            base.SuspendLayout();
            this.gridds_dongia.Caption = "Đơn gi\x00e1";
            this.gridds_dongia.ColumnEdit = this.repositoryItemTextEdit2;
            this.gridds_dongia.FieldName = "giaban";
            this.gridds_dongia.Name = "gridds_dongia";
            this.gridds_dongia.Visible = true;
            this.gridds_dongia.VisibleIndex = 3;
            this.gridds_dongia.Width = 0x42;
            this.repositoryItemTextEdit2.AutoHeight = false;
            this.repositoryItemTextEdit2.DisplayFormat.FormatString = "n0";
            this.repositoryItemTextEdit2.DisplayFormat.FormatType = FormatType.Numeric;
            this.repositoryItemTextEdit2.EditFormat.FormatType = FormatType.Numeric;
            this.repositoryItemTextEdit2.Mask.EditMask = "n0";
            this.repositoryItemTextEdit2.Mask.MaskType = MaskType.Numeric;
            this.repositoryItemTextEdit2.Name = "repositoryItemTextEdit2";
            this.gridView1.Appearance.ColumnFilterButton.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.ColumnFilterButton.BorderColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.ColumnFilterButton.ForeColor = Color.Black;
            this.gridView1.Appearance.ColumnFilterButton.Options.UseBackColor = true;
            this.gridView1.Appearance.ColumnFilterButton.Options.UseBorderColor = true;
            this.gridView1.Appearance.ColumnFilterButton.Options.UseForeColor = true;
            this.gridView1.Appearance.ColumnFilterButtonActive.BackColor = Color.FromArgb(0xdd, 0xe7, 0xea);
            this.gridView1.Appearance.ColumnFilterButtonActive.BorderColor = Color.FromArgb(0xdd, 0xe7, 0xea);
            this.gridView1.Appearance.ColumnFilterButtonActive.ForeColor = Color.Black;
            this.gridView1.Appearance.ColumnFilterButtonActive.Options.UseBackColor = true;
            this.gridView1.Appearance.ColumnFilterButtonActive.Options.UseBorderColor = true;
            this.gridView1.Appearance.ColumnFilterButtonActive.Options.UseForeColor = true;
            this.gridView1.Appearance.Empty.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.Empty.BackColor2 = Color.White;
            this.gridView1.Appearance.Empty.Options.UseBackColor = true;
            this.gridView1.Appearance.EvenRow.BackColor = Color.FromArgb(0xdd, 0xe7, 0xea);
            this.gridView1.Appearance.EvenRow.BorderColor = Color.FromArgb(0xdd, 0xe7, 0xea);
            this.gridView1.Appearance.EvenRow.ForeColor = Color.Black;
            this.gridView1.Appearance.EvenRow.Options.UseBackColor = true;
            this.gridView1.Appearance.EvenRow.Options.UseBorderColor = true;
            this.gridView1.Appearance.EvenRow.Options.UseForeColor = true;
            this.gridView1.Appearance.FilterCloseButton.BackColor = Color.FromArgb(0xd8, 0xd1, 0xb3);
            this.gridView1.Appearance.FilterCloseButton.BorderColor = Color.FromArgb(0xd8, 0xd1, 0xb3);
            this.gridView1.Appearance.FilterCloseButton.ForeColor = Color.Black;
            this.gridView1.Appearance.FilterCloseButton.Options.UseBackColor = true;
            this.gridView1.Appearance.FilterCloseButton.Options.UseBorderColor = true;
            this.gridView1.Appearance.FilterCloseButton.Options.UseForeColor = true;
            this.gridView1.Appearance.FilterPanel.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.FilterPanel.BackColor2 = Color.White;
            this.gridView1.Appearance.FilterPanel.ForeColor = Color.Black;
            this.gridView1.Appearance.FilterPanel.Options.UseBackColor = true;
            this.gridView1.Appearance.FilterPanel.Options.UseForeColor = true;
            this.gridView1.Appearance.FixedLine.BackColor = Color.FromArgb(0x7a, 0x72, 0x71);
            this.gridView1.Appearance.FixedLine.Options.UseBackColor = true;
            this.gridView1.Appearance.FocusedCell.BackColor = Color.White;
            this.gridView1.Appearance.FocusedCell.ForeColor = Color.Black;
            this.gridView1.Appearance.FocusedCell.Options.UseBackColor = true;
            this.gridView1.Appearance.FocusedCell.Options.UseForeColor = true;
            this.gridView1.Appearance.FocusedRow.BackColor = Color.FromArgb(200, 0xc0, 0x9d);
            this.gridView1.Appearance.FocusedRow.BorderColor = Color.FromArgb(0xe2, 0xdb, 0xbc);
            this.gridView1.Appearance.FocusedRow.ForeColor = Color.Black;
            this.gridView1.Appearance.FocusedRow.Options.UseBackColor = true;
            this.gridView1.Appearance.FocusedRow.Options.UseBorderColor = true;
            this.gridView1.Appearance.FocusedRow.Options.UseForeColor = true;
            this.gridView1.Appearance.FooterPanel.BackColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView1.Appearance.FooterPanel.BorderColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView1.Appearance.FooterPanel.ForeColor = Color.Black;
            this.gridView1.Appearance.FooterPanel.Options.UseBackColor = true;
            this.gridView1.Appearance.FooterPanel.Options.UseBorderColor = true;
            this.gridView1.Appearance.FooterPanel.Options.UseForeColor = true;
            this.gridView1.Appearance.GroupButton.BackColor = Color.FromArgb(0xd8, 0xd1, 0xb3);
            this.gridView1.Appearance.GroupButton.BorderColor = Color.FromArgb(0xd8, 0xd1, 0xb3);
            this.gridView1.Appearance.GroupButton.Options.UseBackColor = true;
            this.gridView1.Appearance.GroupButton.Options.UseBorderColor = true;
            this.gridView1.Appearance.GroupFooter.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.GroupFooter.BorderColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.GroupFooter.ForeColor = Color.Black;
            this.gridView1.Appearance.GroupFooter.Options.UseBackColor = true;
            this.gridView1.Appearance.GroupFooter.Options.UseBorderColor = true;
            this.gridView1.Appearance.GroupFooter.Options.UseForeColor = true;
            this.gridView1.Appearance.GroupPanel.BackColor = Color.FromArgb(0xf6, 0xf2, 0xd5);
            this.gridView1.Appearance.GroupPanel.BackColor2 = Color.White;
            this.gridView1.Appearance.GroupPanel.ForeColor = Color.Black;
            this.gridView1.Appearance.GroupPanel.Options.UseBackColor = true;
            this.gridView1.Appearance.GroupPanel.Options.UseForeColor = true;
            this.gridView1.Appearance.GroupRow.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.GroupRow.BorderColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.GroupRow.ForeColor = Color.Black;
            this.gridView1.Appearance.GroupRow.Options.UseBackColor = true;
            this.gridView1.Appearance.GroupRow.Options.UseBorderColor = true;
            this.gridView1.Appearance.GroupRow.Options.UseForeColor = true;
            this.gridView1.Appearance.HeaderPanel.BackColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView1.Appearance.HeaderPanel.BorderColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView1.Appearance.HeaderPanel.ForeColor = Color.Black;
            this.gridView1.Appearance.HeaderPanel.Options.UseBackColor = true;
            this.gridView1.Appearance.HeaderPanel.Options.UseBorderColor = true;
            this.gridView1.Appearance.HeaderPanel.Options.UseForeColor = true;
            this.gridView1.Appearance.HideSelectionRow.BackColor = Color.FromArgb(0xed, 230, 0xcb);
            this.gridView1.Appearance.HideSelectionRow.BorderColor = Color.FromArgb(0xed, 230, 0xcb);
            this.gridView1.Appearance.HideSelectionRow.ForeColor = Color.Black;
            this.gridView1.Appearance.HideSelectionRow.Options.UseBackColor = true;
            this.gridView1.Appearance.HideSelectionRow.Options.UseBorderColor = true;
            this.gridView1.Appearance.HideSelectionRow.Options.UseForeColor = true;
            this.gridView1.Appearance.HorzLine.BackColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView1.Appearance.HorzLine.Options.UseBackColor = true;
            this.gridView1.Appearance.OddRow.BackColor = Color.FromArgb(0xf2, 0xf4, 0xec);
            this.gridView1.Appearance.OddRow.BorderColor = Color.FromArgb(0xf2, 0xf4, 0xec);
            this.gridView1.Appearance.OddRow.ForeColor = Color.Black;
            this.gridView1.Appearance.OddRow.Options.UseBackColor = true;
            this.gridView1.Appearance.OddRow.Options.UseBorderColor = true;
            this.gridView1.Appearance.OddRow.Options.UseForeColor = true;
            this.gridView1.Appearance.Preview.BackColor = Color.FromArgb(0xfb, 0xfc, 0xf7);
            this.gridView1.Appearance.Preview.Font = new Font("Verdana", 7.5f);
            this.gridView1.Appearance.Preview.ForeColor = Color.FromArgb(0x94, 0x94, 0x94);
            this.gridView1.Appearance.Preview.Options.UseBackColor = true;
            this.gridView1.Appearance.Preview.Options.UseFont = true;
            this.gridView1.Appearance.Preview.Options.UseForeColor = true;
            this.gridView1.Appearance.Row.BackColor = Color.FromArgb(0xf2, 0xf4, 0xec);
            this.gridView1.Appearance.Row.ForeColor = Color.Black;
            this.gridView1.Appearance.Row.Options.UseBackColor = true;
            this.gridView1.Appearance.Row.Options.UseForeColor = true;
            this.gridView1.Appearance.RowSeparator.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView1.Appearance.RowSeparator.BackColor2 = Color.White;
            this.gridView1.Appearance.RowSeparator.Options.UseBackColor = true;
            this.gridView1.Appearance.SelectedRow.BackColor = Color.FromArgb(0xdd, 0xd7, 0xbc);
            this.gridView1.Appearance.SelectedRow.BorderColor = Color.FromArgb(0xed, 230, 0xcb);
            this.gridView1.Appearance.SelectedRow.ForeColor = Color.Black;
            this.gridView1.Appearance.SelectedRow.Options.UseBackColor = true;
            this.gridView1.Appearance.SelectedRow.Options.UseBorderColor = true;
            this.gridView1.Appearance.SelectedRow.Options.UseForeColor = true;
            this.gridView1.Appearance.TopNewRow.BackColor = Color.White;
            this.gridView1.Appearance.TopNewRow.Options.UseBackColor = true;
            this.gridView1.Appearance.VertLine.BackColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView1.Appearance.VertLine.Options.UseBackColor = true;
            this.gridView1.Columns.AddRange(new GridColumn[] { 
                this.gridds_ma, this.gridds_ten, this.gridds_dvt, this.gridds_id, this.gridds_dongia, this.gridds_soluong, this.gridds_thanhtien, this.gridds_idnhapct, this.gridds_slxuat, this.gridds_tenhoatchat, this.gridds_giaban, this.gridds_losx, this.gridds_handung, this.gridds_hangsx, this.gridds_idvitrikho, this.gridds_thue, 
                this.gridds_tongtien, this.gridds_tenvitrikho
             });
            condition.Appearance.ForeColor = Color.Red;
            condition.Appearance.Options.UseForeColor = true;
            condition.Column = this.gridds_dongia;
            condition.Condition = FormatConditionEnum.Between;
            condition.Value1 = "0";
            condition.Value2 = "0";
            this.gridView1.FormatConditions.AddRange(new StyleFormatCondition[] { condition });
            this.gridView1.GridControl = this.gridds;
            this.gridView1.Name = "gridView1";
            this.gridView1.OptionsBehavior.AllowAddRows = DefaultBoolean.True;
            this.gridView1.OptionsBehavior.AllowDeleteRows = DefaultBoolean.False;
            this.gridView1.OptionsBehavior.ReadOnly = true;
            this.gridView1.OptionsView.AutoCalcPreviewLineCount = true;
            this.gridView1.OptionsView.ColumnAutoWidth = false;
            this.gridView1.OptionsView.EnableAppearanceEvenRow = true;
            this.gridView1.OptionsView.EnableAppearanceOddRow = true;
            this.gridView1.OptionsView.ShowAutoFilterRow = true;
            this.gridView1.OptionsView.ShowFooter = true;
            this.gridView1.OptionsView.ShowGroupPanel = false;
            this.gridView1.RowCellStyle += new RowCellStyleEventHandler(this.gridView1_RowCellStyle);
            this.gridView1.CustomSummaryCalculate += new CustomSummaryEventHandler(this.gridView1_CustomSummaryCalculate);
            this.gridView1.FocusedRowChanged += new FocusedRowChangedEventHandler(this.gridView1_FocusedRowChanged);
            this.gridds_ma.Caption = "M\x00e3 số";
            this.gridds_ma.ColumnEdit = this.repositoryItemTextEdit1;
            this.gridds_ma.FieldName = "madp";
            this.gridds_ma.Name = "gridds_ma";
            this.gridds_ma.OptionsColumn.AllowEdit = false;
            this.gridds_ma.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem(SummaryItemType.Count, "ma", "Cộng: {0:n0}") });
            this.gridds_ma.Visible = true;
            this.gridds_ma.VisibleIndex = 0;
            this.gridds_ma.Width = 0x3d;
            this.repositoryItemTextEdit1.AutoHeight = false;
            this.repositoryItemTextEdit1.Name = "repositoryItemTextEdit1";
            this.repositoryItemTextEdit1.ReadOnly = true;
            this.gridds_ten.Caption = "T\x00ean dược phẩm";
            this.gridds_ten.ColumnEdit = this.repositoryItemTextEdit1;
            this.gridds_ten.FieldName = "tendp";
            this.gridds_ten.Name = "gridds_ten";
            this.gridds_ten.OptionsColumn.AllowEdit = false;
            this.gridds_ten.Visible = true;
            this.gridds_ten.VisibleIndex = 1;
            this.gridds_ten.Width = 190;
            this.gridds_dvt.Caption = "ĐVT";
            this.gridds_dvt.ColumnEdit = this.repositoryItemTextEdit1;
            this.gridds_dvt.FieldName = "dvt";
            this.gridds_dvt.Name = "gridds_dvt";
            this.gridds_dvt.OptionsColumn.AllowEdit = false;
            this.gridds_dvt.Visible = true;
            this.gridds_dvt.VisibleIndex = 2;
            this.gridds_dvt.Width = 0x27;
            this.gridds_id.Caption = "id";
            this.gridds_id.FieldName = "iddp";
            this.gridds_id.Name = "gridds_id";
            this.gridds_soluong.Caption = "SL";
            this.gridds_soluong.ColumnEdit = this.repositoryItemTextEdit2;
            this.gridds_soluong.FieldName = "soluong";
            this.gridds_soluong.Name = "gridds_soluong";
            this.gridds_soluong.Visible = true;
            this.gridds_soluong.VisibleIndex = 4;
            this.gridds_soluong.Width = 0x25;
            this.gridds_thanhtien.Caption = "Th\x00e0nh tiền";
            this.gridds_thanhtien.ColumnEdit = this.repositoryItemTextEdit2;
            this.gridds_thanhtien.FieldName = "thanhtien";
            this.gridds_thanhtien.Name = "gridds_thanhtien";
            this.gridds_thanhtien.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem(SummaryItemType.Sum, "thanhtien", "Tổng: {0:n0}") });
            this.gridds_thanhtien.Visible = true;
            this.gridds_thanhtien.VisibleIndex = 5;
            this.gridds_thanhtien.Width = 100;
            this.gridds_idnhapct.Caption = "idnhapct";
            this.gridds_idnhapct.FieldName = "id";
            this.gridds_idnhapct.Name = "gridds_idnhapct";
            this.gridds_slxuat.Caption = "sldathanhtoan";
            this.gridds_slxuat.FieldName = "soluongxuat";
            this.gridds_slxuat.Name = "gridds_slxuat";
            this.gridds_tenhoatchat.Caption = "tenhoatchat";
            this.gridds_tenhoatchat.FieldName = "tenhoatchat";
            this.gridds_tenhoatchat.Name = "gridds_tenhoatchat";
            this.gridds_giaban.Caption = "giaban";
            this.gridds_giaban.FieldName = "giaban";
            this.gridds_giaban.Name = "gridds_giaban";
            this.gridds_losx.Caption = "L\x00f4 SX";
            this.gridds_losx.FieldName = "losx";
            this.gridds_losx.Name = "gridds_losx";
            this.gridds_losx.Visible = true;
            this.gridds_losx.VisibleIndex = 8;
            this.gridds_handung.Caption = "Date";
            this.gridds_handung.FieldName = "handung";
            this.gridds_handung.Name = "gridds_handung";
            this.gridds_handung.Visible = true;
            this.gridds_handung.VisibleIndex = 9;
            this.gridds_hangsx.Caption = "hangsx";
            this.gridds_hangsx.FieldName = "hangsx";
            this.gridds_hangsx.Name = "gridds_hangsx";
            this.gridds_idvitrikho.Caption = "idvitrikho";
            this.gridds_idvitrikho.FieldName = "idvitrikho";
            this.gridds_idvitrikho.Name = "gridds_idvitrikho";
            this.gridds_thue.Caption = "Thuế %";
            this.gridds_thue.FieldName = "thue";
            this.gridds_thue.Name = "gridds_thue";
            this.gridds_thue.Visible = true;
            this.gridds_thue.VisibleIndex = 6;
            this.gridds_thue.Width = 0x33;
            this.gridds_tongtien.Caption = "Tổng tiền";
            this.gridds_tongtien.ColumnEdit = this.repositoryItemTextEdit2;
            this.gridds_tongtien.FieldName = "tiensauthue";
            this.gridds_tongtien.Name = "gridds_tongtien";
            this.gridds_tongtien.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem(SummaryItemType.Sum, "tiensauthue", "Tổng: {0:n0}") });
            this.gridds_tongtien.Visible = true;
            this.gridds_tongtien.VisibleIndex = 7;
            this.gridds_tongtien.Width = 0x5f;
            this.gridds_tenvitrikho.Caption = "Vị tr\x00ed trong kho";
            this.gridds_tenvitrikho.FieldName = "tenvitrikho";
            this.gridds_tenvitrikho.Name = "gridds_tenvitrikho";
            this.gridds_tenvitrikho.Visible = true;
            this.gridds_tenvitrikho.VisibleIndex = 10;
            this.gridds_tenvitrikho.Width = 0x107;
            this.gridds.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.gridds.Location = new Point(0, 0x16);
            this.gridds.MainView = this.gridView1;
            this.gridds.Name = "gridds";
            this.gridds.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemTextEdit1, this.repositoryItemTextEdit2 });
            this.gridds.Size = new Size(0x400, 0xa6);
            this.gridds.TabIndex = 0x20;
            this.gridds.ViewCollection.AddRange(new BaseView[] { this.gridView1 });
            this.groupControl1.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.groupControl1.Appearance.Font = new Font("Tahoma", 10f);
            this.groupControl1.Appearance.Options.UseFont = true;
            this.groupControl1.AppearanceCaption.Font = new Font("Tahoma", 10f, FontStyle.Bold);
            this.groupControl1.AppearanceCaption.Options.UseFont = true;
            this.groupControl1.Controls.Add(this.btntim);
            this.groupControl1.Controls.Add(this.datetungay);
            this.groupControl1.Controls.Add(this.datedenngay);
            this.groupControl1.Controls.Add(this.label27);
            this.groupControl1.Controls.Add(this.label11);
            this.groupControl1.Controls.Add(this.gridsp);
            this.groupControl1.Controls.Add(this.standaloneBarDockControl1);
            this.groupControl1.Location = new Point(0, 0x2c);
            this.groupControl1.Name = "groupControl1";
            this.groupControl1.Size = new Size(0x401, 0xfd);
            this.groupControl1.TabIndex = 0x22;
            this.groupControl1.Text = "Phiếu đ\x00e3 xuất";
            this.btntim.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.btntim.Image = (Image) manager.GetObject("btntim.Image");
            this.btntim.Location = new Point(0x3df, 0x1d);
            this.btntim.Name = "btntim";
            this.btntim.Size = new Size(0x1a, 20);
            this.btntim.TabIndex = 30;
            this.btntim.Click += new EventHandler(this.btntim_Click);
            this.datetungay.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.datetungay.EditValue = new DateTime(0x7dd, 11, 8, 2, 0x16, 9, 0x297);
            this.datetungay.Location = new Point(0x31f, 30);
            this.datetungay.Name = "datetungay";
            this.datetungay.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.datetungay.Properties.DisplayFormat.FormatString = "dd/MM/yyyy";
            this.datetungay.Properties.DisplayFormat.FormatType = FormatType.DateTime;
            this.datetungay.Properties.EditFormat.FormatString = "dd/MM/yyyy";
            this.datetungay.Properties.EditFormat.FormatType = FormatType.DateTime;
            this.datetungay.Properties.Mask.EditMask = "dd/MM/yyyy";
            this.datetungay.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.datetungay.Size = new Size(80, 20);
            this.datetungay.TabIndex = 0x16;
            this.datedenngay.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.datedenngay.EditValue = new DateTime(0x7dd, 11, 8, 2, 0x16, 9, 0x297);
            this.datedenngay.Location = new Point(0x38b, 0x1d);
            this.datedenngay.Name = "datedenngay";
            this.datedenngay.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.datedenngay.Properties.DisplayFormat.FormatString = "dd/MM/yyyy";
            this.datedenngay.Properties.DisplayFormat.FormatType = FormatType.DateTime;
            this.datedenngay.Properties.EditFormat.FormatString = "dd/MM/yyyy";
            this.datedenngay.Properties.EditFormat.FormatType = FormatType.DateTime;
            this.datedenngay.Properties.Mask.EditMask = "dd/MM/yyyy";
            this.datedenngay.Properties.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.datedenngay.Size = new Size(80, 20);
            this.datedenngay.TabIndex = 0x16;
            this.label27.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.label27.Font = new Font("Tahoma", 10f);
            this.label27.Location = new Point(0x36c, 30);
            this.label27.Name = "label27";
            this.label27.Size = new Size(0x23, 0x13);
            this.label27.TabIndex = 2;
            this.label27.Text = "đến:";
            this.label27.TextAlign = ContentAlignment.TopRight;
            this.label11.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.label11.Font = new Font("Tahoma", 10f);
            this.label11.Location = new Point(0x300, 0x18);
            this.label11.Name = "label11";
            this.label11.Size = new Size(0x100, 0x1f);
            this.label11.TabIndex = 2;
            this.label11.Text = "Từ:";
            this.label11.TextAlign = ContentAlignment.MiddleLeft;
            this.gridsp.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.gridsp.Location = new Point(0, 0x38);
            this.gridsp.MainView = this.gridView2;
            this.gridsp.Name = "gridsp";
            this.gridsp.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemTextEdit3, this.repositoryItemTextEdit4 });
            this.gridsp.Size = new Size(0x400, 0xc3);
            this.gridsp.TabIndex = 0;
            this.gridsp.ViewCollection.AddRange(new BaseView[] { this.gridView2 });
            this.gridView2.Appearance.ColumnFilterButton.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.ColumnFilterButton.BorderColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.ColumnFilterButton.ForeColor = Color.Black;
            this.gridView2.Appearance.ColumnFilterButton.Options.UseBackColor = true;
            this.gridView2.Appearance.ColumnFilterButton.Options.UseBorderColor = true;
            this.gridView2.Appearance.ColumnFilterButton.Options.UseForeColor = true;
            this.gridView2.Appearance.ColumnFilterButtonActive.BackColor = Color.FromArgb(0xdd, 0xe7, 0xea);
            this.gridView2.Appearance.ColumnFilterButtonActive.BorderColor = Color.FromArgb(0xdd, 0xe7, 0xea);
            this.gridView2.Appearance.ColumnFilterButtonActive.ForeColor = Color.Black;
            this.gridView2.Appearance.ColumnFilterButtonActive.Options.UseBackColor = true;
            this.gridView2.Appearance.ColumnFilterButtonActive.Options.UseBorderColor = true;
            this.gridView2.Appearance.ColumnFilterButtonActive.Options.UseForeColor = true;
            this.gridView2.Appearance.Empty.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.Empty.BackColor2 = Color.White;
            this.gridView2.Appearance.Empty.Options.UseBackColor = true;
            this.gridView2.Appearance.EvenRow.BackColor = Color.FromArgb(0xdd, 0xe7, 0xea);
            this.gridView2.Appearance.EvenRow.BorderColor = Color.FromArgb(0xdd, 0xe7, 0xea);
            this.gridView2.Appearance.EvenRow.ForeColor = Color.Black;
            this.gridView2.Appearance.EvenRow.Options.UseBackColor = true;
            this.gridView2.Appearance.EvenRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.EvenRow.Options.UseForeColor = true;
            this.gridView2.Appearance.FilterCloseButton.BackColor = Color.FromArgb(0xd8, 0xd1, 0xb3);
            this.gridView2.Appearance.FilterCloseButton.BorderColor = Color.FromArgb(0xd8, 0xd1, 0xb3);
            this.gridView2.Appearance.FilterCloseButton.ForeColor = Color.Black;
            this.gridView2.Appearance.FilterCloseButton.Options.UseBackColor = true;
            this.gridView2.Appearance.FilterCloseButton.Options.UseBorderColor = true;
            this.gridView2.Appearance.FilterCloseButton.Options.UseForeColor = true;
            this.gridView2.Appearance.FilterPanel.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.FilterPanel.BackColor2 = Color.White;
            this.gridView2.Appearance.FilterPanel.ForeColor = Color.Black;
            this.gridView2.Appearance.FilterPanel.Options.UseBackColor = true;
            this.gridView2.Appearance.FilterPanel.Options.UseForeColor = true;
            this.gridView2.Appearance.FixedLine.BackColor = Color.FromArgb(0x7a, 0x72, 0x71);
            this.gridView2.Appearance.FixedLine.Options.UseBackColor = true;
            this.gridView2.Appearance.FocusedCell.BackColor = Color.White;
            this.gridView2.Appearance.FocusedCell.ForeColor = Color.Black;
            this.gridView2.Appearance.FocusedCell.Options.UseBackColor = true;
            this.gridView2.Appearance.FocusedCell.Options.UseForeColor = true;
            this.gridView2.Appearance.FocusedRow.BackColor = Color.FromArgb(200, 0xc0, 0x9d);
            this.gridView2.Appearance.FocusedRow.BorderColor = Color.FromArgb(0xe2, 0xdb, 0xbc);
            this.gridView2.Appearance.FocusedRow.ForeColor = Color.Black;
            this.gridView2.Appearance.FocusedRow.Options.UseBackColor = true;
            this.gridView2.Appearance.FocusedRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.FocusedRow.Options.UseForeColor = true;
            this.gridView2.Appearance.FooterPanel.BackColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView2.Appearance.FooterPanel.BorderColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView2.Appearance.FooterPanel.ForeColor = Color.Black;
            this.gridView2.Appearance.FooterPanel.Options.UseBackColor = true;
            this.gridView2.Appearance.FooterPanel.Options.UseBorderColor = true;
            this.gridView2.Appearance.FooterPanel.Options.UseForeColor = true;
            this.gridView2.Appearance.GroupButton.BackColor = Color.FromArgb(0xd8, 0xd1, 0xb3);
            this.gridView2.Appearance.GroupButton.BorderColor = Color.FromArgb(0xd8, 0xd1, 0xb3);
            this.gridView2.Appearance.GroupButton.Options.UseBackColor = true;
            this.gridView2.Appearance.GroupButton.Options.UseBorderColor = true;
            this.gridView2.Appearance.GroupFooter.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.GroupFooter.BorderColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.GroupFooter.ForeColor = Color.Black;
            this.gridView2.Appearance.GroupFooter.Options.UseBackColor = true;
            this.gridView2.Appearance.GroupFooter.Options.UseBorderColor = true;
            this.gridView2.Appearance.GroupFooter.Options.UseForeColor = true;
            this.gridView2.Appearance.GroupPanel.BackColor = Color.FromArgb(0xf6, 0xf2, 0xd5);
            this.gridView2.Appearance.GroupPanel.BackColor2 = Color.White;
            this.gridView2.Appearance.GroupPanel.ForeColor = Color.Black;
            this.gridView2.Appearance.GroupPanel.Options.UseBackColor = true;
            this.gridView2.Appearance.GroupPanel.Options.UseForeColor = true;
            this.gridView2.Appearance.GroupRow.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.GroupRow.BorderColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.GroupRow.ForeColor = Color.Black;
            this.gridView2.Appearance.GroupRow.Options.UseBackColor = true;
            this.gridView2.Appearance.GroupRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.GroupRow.Options.UseForeColor = true;
            this.gridView2.Appearance.HeaderPanel.BackColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView2.Appearance.HeaderPanel.BorderColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView2.Appearance.HeaderPanel.ForeColor = Color.Black;
            this.gridView2.Appearance.HeaderPanel.Options.UseBackColor = true;
            this.gridView2.Appearance.HeaderPanel.Options.UseBorderColor = true;
            this.gridView2.Appearance.HeaderPanel.Options.UseForeColor = true;
            this.gridView2.Appearance.HideSelectionRow.BackColor = Color.FromArgb(0xed, 230, 0xcb);
            this.gridView2.Appearance.HideSelectionRow.BorderColor = Color.FromArgb(0xed, 230, 0xcb);
            this.gridView2.Appearance.HideSelectionRow.ForeColor = Color.Black;
            this.gridView2.Appearance.HideSelectionRow.Options.UseBackColor = true;
            this.gridView2.Appearance.HideSelectionRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.HideSelectionRow.Options.UseForeColor = true;
            this.gridView2.Appearance.HorzLine.BackColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView2.Appearance.HorzLine.Options.UseBackColor = true;
            this.gridView2.Appearance.OddRow.BackColor = Color.FromArgb(0xf2, 0xf4, 0xec);
            this.gridView2.Appearance.OddRow.BorderColor = Color.FromArgb(0xf2, 0xf4, 0xec);
            this.gridView2.Appearance.OddRow.ForeColor = Color.Black;
            this.gridView2.Appearance.OddRow.Options.UseBackColor = true;
            this.gridView2.Appearance.OddRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.OddRow.Options.UseForeColor = true;
            this.gridView2.Appearance.Preview.BackColor = Color.FromArgb(0xfb, 0xfc, 0xf7);
            this.gridView2.Appearance.Preview.Font = new Font("Verdana", 7.5f);
            this.gridView2.Appearance.Preview.ForeColor = Color.FromArgb(0x94, 0x94, 0x94);
            this.gridView2.Appearance.Preview.Options.UseBackColor = true;
            this.gridView2.Appearance.Preview.Options.UseFont = true;
            this.gridView2.Appearance.Preview.Options.UseForeColor = true;
            this.gridView2.Appearance.RowSeparator.BackColor = Color.FromArgb(0xec, 0xe8, 0xc9);
            this.gridView2.Appearance.RowSeparator.BackColor2 = Color.White;
            this.gridView2.Appearance.RowSeparator.Options.UseBackColor = true;
            this.gridView2.Appearance.SelectedRow.BackColor = Color.FromArgb(0xdd, 0xd7, 0xbc);
            this.gridView2.Appearance.SelectedRow.BorderColor = Color.FromArgb(0xed, 230, 0xcb);
            this.gridView2.Appearance.SelectedRow.ForeColor = Color.Black;
            this.gridView2.Appearance.SelectedRow.Options.UseBackColor = true;
            this.gridView2.Appearance.SelectedRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.SelectedRow.Options.UseForeColor = true;
            this.gridView2.Appearance.TopNewRow.BackColor = Color.White;
            this.gridView2.Appearance.TopNewRow.Options.UseBackColor = true;
            this.gridView2.Appearance.VertLine.BackColor = Color.FromArgb(0xd8, 0xd1, 170);
            this.gridView2.Appearance.VertLine.Options.UseBackColor = true;
            this.gridView2.Columns.AddRange(new GridColumn[] { this.gridsp_id, this.gridsp_sophieu, this.gridsp_ngay, this.gridsp_hoten, this.gridsp_diachi, this.gridsp_namsinh, this.gridsp_phai, this.gridsp_chietkhau, this.gridsp_tongtien });
            condition2.Appearance.ForeColor = Color.Red;
            condition2.Appearance.Options.UseForeColor = true;
            condition2.Condition = FormatConditionEnum.Between;
            condition2.Value1 = "0";
            condition2.Value2 = "0";
            this.gridView2.FormatConditions.AddRange(new StyleFormatCondition[] { condition2 });
            this.gridView2.GridControl = this.gridsp;
            this.gridView2.Name = "gridView2";
            this.gridView2.OptionsBehavior.AllowAddRows = DefaultBoolean.True;
            this.gridView2.OptionsBehavior.AllowDeleteRows = DefaultBoolean.False;
            this.gridView2.OptionsBehavior.ReadOnly = true;
            this.gridView2.OptionsView.AutoCalcPreviewLineCount = true;
            this.gridView2.OptionsView.EnableAppearanceEvenRow = true;
            this.gridView2.OptionsView.EnableAppearanceOddRow = true;
            this.gridView2.OptionsView.ShowAutoFilterRow = true;
            this.gridView2.OptionsView.ShowFooter = true;
            this.gridView2.OptionsView.ShowGroupPanel = false;
            this.gridView2.CustomSummaryCalculate += new CustomSummaryEventHandler(this.gridView1_CustomSummaryCalculate);
            this.gridView2.FocusedRowChanged += new FocusedRowChangedEventHandler(this.gridView2_FocusedRowChanged);
            this.gridsp_id.Caption = "id";
            this.gridsp_id.FieldName = "id";
            this.gridsp_id.Name = "gridsp_id";
            this.gridsp_sophieu.Caption = "Số phiếu";
            this.gridsp_sophieu.FieldName = "sophieu";
            this.gridsp_sophieu.Name = "gridsp_sophieu";
            this.gridsp_sophieu.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem(SummaryItemType.Count, "sophieu", "Cộng: {0:n0}") });
            this.gridsp_sophieu.Visible = true;
            this.gridsp_sophieu.VisibleIndex = 0;
            this.gridsp_ngay.Caption = "Ng\x00e0y";
            this.gridsp_ngay.FieldName = "ngay";
            this.gridsp_ngay.Name = "gridsp_ngay";
            this.gridsp_ngay.Visible = true;
            this.gridsp_ngay.VisibleIndex = 1;
            this.gridsp_ngay.Width = 0x6a;
            this.gridsp_hoten.Caption = "Họ v\x00e0 t\x00ean";
            this.gridsp_hoten.FieldName = "hoten";
            this.gridsp_hoten.Name = "gridsp_hoten";
            this.gridsp_hoten.Visible = true;
            this.gridsp_hoten.VisibleIndex = 2;
            this.gridsp_hoten.Width = 0xb3;
            this.gridsp_diachi.Caption = "Địa chỉ";
            this.gridsp_diachi.FieldName = "diachi";
            this.gridsp_diachi.Name = "gridsp_diachi";
            this.gridsp_diachi.Visible = true;
            this.gridsp_diachi.VisibleIndex = 3;
            this.gridsp_diachi.Width = 0x83;
            this.gridsp_namsinh.Caption = "Năm sinh";
            this.gridsp_namsinh.FieldName = "namsinh";
            this.gridsp_namsinh.Name = "gridsp_namsinh";
            this.gridsp_namsinh.Visible = true;
            this.gridsp_namsinh.VisibleIndex = 4;
            this.gridsp_namsinh.Width = 0x39;
            this.gridsp_phai.Caption = "Ph\x00e1i";
            this.gridsp_phai.FieldName = "phai";
            this.gridsp_phai.Name = "gridsp_phai";
            this.gridsp_phai.Visible = true;
            this.gridsp_phai.VisibleIndex = 5;
            this.gridsp_phai.Width = 0x29;
            this.gridsp_chietkhau.Caption = "Chiết khấu";
            this.gridsp_chietkhau.FieldName = "chietkhau";
            this.gridsp_chietkhau.Name = "gridsp_chietkhau";
            this.gridsp_chietkhau.Visible = true;
            this.gridsp_chietkhau.VisibleIndex = 6;
            this.gridsp_chietkhau.Width = 0x40;
            this.gridsp_tongtien.Caption = "Tổng tiền";
            this.gridsp_tongtien.DisplayFormat.FormatString = "n0";
            this.gridsp_tongtien.DisplayFormat.FormatType = FormatType.Numeric;
            this.gridsp_tongtien.FieldName = "tongtien";
            this.gridsp_tongtien.Name = "gridsp_tongtien";
            this.gridsp_tongtien.Visible = true;
            this.gridsp_tongtien.VisibleIndex = 7;
            this.gridsp_tongtien.Width = 0x161;
            this.repositoryItemTextEdit3.AutoHeight = false;
            this.repositoryItemTextEdit3.Name = "repositoryItemTextEdit3";
            this.repositoryItemTextEdit3.ReadOnly = true;
            this.repositoryItemTextEdit4.AutoHeight = false;
            this.repositoryItemTextEdit4.DisplayFormat.FormatString = "n0";
            this.repositoryItemTextEdit4.DisplayFormat.FormatType = FormatType.Numeric;
            this.repositoryItemTextEdit4.EditFormat.FormatType = FormatType.Numeric;
            this.repositoryItemTextEdit4.Mask.EditMask = "n0";
            this.repositoryItemTextEdit4.Mask.MaskType = MaskType.Numeric;
            this.repositoryItemTextEdit4.Name = "repositoryItemTextEdit4";
            this.standaloneBarDockControl1.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.standaloneBarDockControl1.CausesValidation = false;
            this.standaloneBarDockControl1.Location = new Point(2, 0x17);
            this.standaloneBarDockControl1.Name = "standaloneBarDockControl1";
            this.standaloneBarDockControl1.Size = new Size(0x3fe, 0x20);
            this.standaloneBarDockControl1.Text = "standaloneBarDockControl1";
            this.groupControl2.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
            this.groupControl2.AppearanceCaption.Font = new Font("Tahoma", 10f, FontStyle.Bold);
            this.groupControl2.AppearanceCaption.Options.UseFont = true;
            this.groupControl2.Controls.Add(this.gridds);
            this.groupControl2.Location = new Point(0, 0x126);
            this.groupControl2.Name = "groupControl2";
            this.groupControl2.Size = new Size(0x400, 0xbc);
            this.groupControl2.TabIndex = 0x23;
            this.groupControl2.Text = "Chi tiết";
            this.bar1.BarName = "Tools";
            this.bar1.DockCol = 0;
            this.bar1.DockStyle = BarDockStyle.Top;
            this.bar1.Text = "Tools";
            this.barDockControlTop.CausesValidation = false;
            this.barDockControlTop.Dock = DockStyle.Top;
            this.barDockControlTop.Location = new Point(0, 0);
            this.barDockControlTop.Size = new Size(0x400, 0x1d);
            this.barDockControlBottom.CausesValidation = false;
            this.barDockControlBottom.Dock = DockStyle.Bottom;
            this.barDockControlBottom.Location = new Point(0, 0x1e2);
            this.barDockControlBottom.Size = new Size(0x400, 0);
            this.barDockControlLeft.CausesValidation = false;
            this.barDockControlLeft.Dock = DockStyle.Left;
            this.barDockControlLeft.Location = new Point(0, 0x1d);
            this.barDockControlLeft.Size = new Size(0, 0x1c5);
            this.barDockControlRight.CausesValidation = false;
            this.barDockControlRight.Dock = DockStyle.Right;
            this.barDockControlRight.Location = new Point(0x400, 0x1d);
            this.barDockControlRight.Size = new Size(0, 0x1c5);
            this.bar2.BarName = "Main menu";
            this.bar2.DockCol = 0;
            this.bar2.DockStyle = BarDockStyle.Top;
            this.bar2.OptionsBar.MultiLine = true;
            this.bar2.OptionsBar.UseWholeRow = true;
            this.bar2.Text = "Main menu";
            this.barManager1.Bars.AddRange(new Bar[] { this.bar3 });
            this.barManager1.DockControls.Add(this.barDockControl1);
            this.barManager1.DockControls.Add(this.barDockControl2);
            this.barManager1.DockControls.Add(this.barDockControl3);
            this.barManager1.DockControls.Add(this.barDockControl4);
            this.barManager1.DockControls.Add(this.standaloneBarDockControl1);
            this.barManager1.Form = this;
            this.barManager1.Items.AddRange(new BarItem[] { this.bbimoi, this.bbisua, this.bbihuy, this.bbiketthuc });
            this.barManager1.MaxItemId = 6;
            this.bar3.BarName = "Custom 2";
            this.bar3.DockCol = 0;
            this.bar3.DockRow = 0;
            this.bar3.DockStyle = BarDockStyle.Standalone;
            this.bar3.FloatLocation = new Point(0x1ca, 0xad);
            this.bar3.HideWhenMerging = DefaultBoolean.False;
            this.bar3.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbimoi, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbisua, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbihuy, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiketthuc, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph) });
            this.bar3.OptionsBar.DrawBorder = false;
            this.bar3.OptionsBar.DrawDragBorder = false;
            this.bar3.StandaloneBarDockControl = this.standaloneBarDockControl1;
            this.bar3.Text = "Custom 2";
            this.bbimoi.Caption = "&Mới [F2]";
            this.bbimoi.Glyph = (Image) manager.GetObject("bbimoi.Glyph");
            this.bbimoi.Id = 2;
            this.bbimoi.ItemAppearance.Normal.Font = new Font("Tahoma", 10f);
            this.bbimoi.ItemAppearance.Normal.Options.UseFont = true;
            this.bbimoi.ItemShortcut = new BarShortcut(Keys.F2);
            this.bbimoi.Name = "bbimoi";
            this.bbimoi.ItemClick += new ItemClickEventHandler(this.bbimoi_ItemClick);
            this.bbisua.Caption = "&Sửa [F3]";
            this.bbisua.Glyph = Properties.Resources.imgedit;// (Image)manager.GetObject("bbisua.Glyph");
            this.bbisua.Id = 3;
            this.bbisua.ItemAppearance.Normal.Font = new Font("Tahoma", 10f);
            this.bbisua.ItemAppearance.Normal.Options.UseFont = true;
            this.bbisua.ItemShortcut = new BarShortcut(Keys.F3);
            this.bbisua.Name = "bbisua";
            this.bbisua.ItemClick += new ItemClickEventHandler(this.bbisua_ItemClick);
            this.bbihuy.Caption = "&Hủy [F8]";
            this.bbihuy.Glyph = Properties.Resources.imgdelete;// (Image) manager.GetObject("bbihuy.Glyph");
            this.bbihuy.Id = 4;
            this.bbihuy.ItemAppearance.Normal.Font = new Font("Tahoma", 10f);
            this.bbihuy.ItemAppearance.Normal.Options.UseFont = true;
            this.bbihuy.ItemShortcut = new BarShortcut(Keys.F8);
            this.bbihuy.Name = "bbihuy";
            this.bbihuy.ItemClick += new ItemClickEventHandler(this.bbihuy_ItemClick);
            this.bbiketthuc.Caption = "&Kết th\x00fac [F12]";
            this.bbiketthuc.Glyph = (Image) manager.GetObject("bbiketthuc.Glyph");
            this.bbiketthuc.Id = 5;
            this.bbiketthuc.ItemAppearance.Normal.Font = new Font("Tahoma", 10f);
            this.bbiketthuc.ItemAppearance.Normal.Options.UseFont = true;
            this.bbiketthuc.ItemShortcut = new BarShortcut(Keys.F12);
            this.bbiketthuc.Name = "bbiketthuc";
            this.bbiketthuc.ItemClick += new ItemClickEventHandler(this.bbiketthuc_ItemClick);
            this.barDockControl1.CausesValidation = false;
            this.barDockControl1.Dock = DockStyle.Top;
            this.barDockControl1.Location = new Point(0, 0);
            this.barDockControl1.Size = new Size(0x400, 0);
            this.barDockControl2.CausesValidation = false;
            this.barDockControl2.Dock = DockStyle.Bottom;
            this.barDockControl2.Location = new Point(0, 0x1e2);
            this.barDockControl2.Size = new Size(0x400, 0);
            this.barDockControl3.CausesValidation = false;
            this.barDockControl3.Dock = DockStyle.Left;
            this.barDockControl3.Location = new Point(0, 0);
            this.barDockControl3.Size = new Size(0, 0x1e2);
            this.barDockControl4.CausesValidation = false;
            this.barDockControl4.Dock = DockStyle.Right;
            this.barDockControl4.Location = new Point(0x400, 0);
            this.barDockControl4.Size = new Size(0, 0x1e2);
            this.label25.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.label25.BackColor = Color.Green;
            this.label25.Font = new Font("Tahoma", 16f);
            this.label25.ForeColor = Color.White;
            this.label25.Location = new Point(0, 0);
            this.label25.Name = "label25";
            this.label25.Size = new Size(0x401, 0x2c);
            this.label25.TabIndex = 0x2a;
            this.label25.Text = "XUẤT B\x00c1N KH\x00d4NG K\x00ca ĐƠN";
            this.label25.TextAlign = ContentAlignment.MiddleLeft;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.label25);
            base.Controls.Add(this.groupControl2);
            base.Controls.Add(this.groupControl1);
            base.Controls.Add(this.barDockControlLeft);
            base.Controls.Add(this.barDockControlRight);
            base.Controls.Add(this.barDockControlBottom);
            base.Controls.Add(this.barDockControlTop);
            base.Controls.Add(this.barDockControl3);
            base.Controls.Add(this.barDockControl4);
            base.Controls.Add(this.barDockControl2);
            base.Controls.Add(this.barDockControl1);
            base.Name = "ucd_xuatkho_banle_kkedon_ds";
            base.Size = new Size(0x400, 0x1e2);
            base.Load += new EventHandler(this.ucDMSanPham_Load);
            base.ControlRemoved += new ControlEventHandler(this.ucd_xuatkho_banle_ds_ControlRemoved);
            this.repositoryItemTextEdit2.EndInit();
            this.gridView1.EndInit();
            this.repositoryItemTextEdit1.EndInit();
            this.gridds.EndInit();
            this.groupControl1.EndInit();
            this.groupControl1.ResumeLayout(false);
            this.datetungay.Properties.VistaTimeProperties.EndInit();
            this.datetungay.Properties.EndInit();
            this.datedenngay.Properties.VistaTimeProperties.EndInit();
            this.datedenngay.Properties.EndInit();
            this.gridsp.EndInit();
            this.gridView2.EndInit();
            this.repositoryItemTextEdit3.EndInit();
            this.repositoryItemTextEdit4.EndInit();
            this.groupControl2.EndInit();
            this.groupControl2.ResumeLayout(false);
            this.barManager1.EndInit();
            base.ResumeLayout(false);
        }

        private void tbnumslsang_Validated(object sender, EventArgs e)
        {
            try
            {
            }
            catch
            {
            }
        }

        private void ucd_xuatkho_banle_ds_ControlRemoved(object sender, ControlEventArgs e)
        {
            if (e.Control.Name == "ucxuatkho")
            {
                this.btntim_Click(null, null);
            }
        }

        private void ucDMSanPham_Load(object sender, EventArgs e)
        {
            this._xuatban = new DXuatBanLe(this._xuli.pConFigData);
            this.datetungay.EditValue = this.datedenngay.EditValue = DateTime.Now;
            this.btntim_Click(null, null);
        }
    }
}

